package org.apogeescience.connector.databases;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.Date;

import org.apogeescience.annotation.NamedQuery;
import org.apogeescience.config.DatabaseConfiguration;

class XMLDatabase implements IDatabase {
	
	private DatabaseConfiguration dbConfig;

	protected XMLDatabase(DatabaseConfiguration config) {
		this.dbConfig = config;
	}

	@Override
	public boolean initialize() {
		return true;
	}

	@Override
	public Map<String, List<Object>> executeQuery(StringBuilder query) {
		Map<String, List<Object>> map = new HashMap<>();
		
		map.put("UserName", new ArrayList<Object>());
		map.put("CreateDate", new ArrayList<Object>());
		
		map.get("UserName").add("Isaac");
		map.get("CreateDate").add(new Date());
		
		map.get("UserName").add("Andrew");
		map.get("CreateDate").add(new Date());
		
		return map;
	}

	@Override
	public void destroy() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String generateQuery(String tableName, NamedQuery namedQuery,
			Hashtable<String, Object> parameters) {
		// TODO Auto-generated method stub
		return null;
	}

}
